package com.fjh.springboot_01.pojo;

import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonIgnore;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.Generated;

import java.time.LocalDateTime;
@Data
public class User {
    @NotNull
    private Integer id;
    private String username;
    @JsonIgnore
    private String password;

    @NotEmpty
    @Pattern(regexp ="^\\S{1,10}$")
    private String nickname;

    @NotEmpty
    @Email
    private String email;
    private String userPic;
    
    // 用户角色：0-学生，1-教师，2-管理员
    private Integer role;
    
    // 教师审核状态：0-待审核，1-已通过，2-已拒绝
    private Integer teacherStatus;

    // 用户状态：1-正常，0-禁用
    private Integer status = 1;
    
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
}
